//
//  FirstTableViewCell.m
//  10--HomeWork
//
//  Created by 冀永金 on 16/7/27.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "FirstTableViewCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@interface FirstTableViewCell ()

@end


@implementation FirstTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createViews];
    }
    return self;
}

- (void)createViews {
    self.image = [[UIImageView alloc]init];
    [self.contentView addSubview:_image];
    //_image.backgroundColor = [UIColor redColor];
    self.labelOfTitle = [[UILabel alloc]init];
    [self.contentView addSubview:_labelOfTitle];
    self.labelOfTitle.numberOfLines = 0;
    //self.labelOfTitle.backgroundColor = [UIColor yellowColor];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.image.frame = CGRectMake(5, 20, 150, self.contentView.frame.size.height - 40);
    self.labelOfTitle.frame = CGRectMake(5+150+5, 25, WIDTH - 5 - 150 - 5, 50);
}





- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
